package com.basic.emg.mapper;


import com.basic.emg.domain.EmergencyDispose;
import com.basic.emg.domain.EmergencyMaterial;
import com.basic.emg.domain.EmergencyPlan;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.SelectKey;
import tk.mybatis.mapper.common.Mapper;


/**
 * 应急处置
 * @Author: Chn
 * @Create: 2024/10/22
 * @Version: 1.0
 */
public interface EmergencyDisposeMapper extends Mapper<EmergencyDispose> {


    @Insert("insert into emergency_dispose (dispose_ref,start_date,event_nature,start_plan,plan_type,team,content,situation,opinion,file_path,create_time,update_time,del_flag,record,record_date)\n" +
            "values ( #{disposeRef},#{startDate},#{eventNature},#{startPlan},#{planType},#{team},#{content},#{situation},#{opinion},#{filePath},localtimestamp,null,'0',#{record},#{recordDate})")
    @SelectKey(statement = "SELECT currval('seq_emergency_dispose_id')", keyProperty = "id", before = false, resultType = long.class)
    public int insertDispose( EmergencyDispose dispose);

}
